﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using Mono.XNA.Scene;
using Mono.XNA.Input;
namespace FPS.Scene
{
    class TestScene : Mono.XNA.Scene.Scene
    {
        private ModelAnimation alpha   = new ModelAnimation();
        private ModelAnimation map     = new ModelAnimation();
        private ModelAnimation target  = new ModelAnimation();


        public TestScene (SceneState state)
            : base(state)
	    {
            this.Camera.SetPerspectiveFieldOfView(45.0f, 1.0f, 300.0f);
            Camera.SetLookAt(new Vector3(50.0f, 100.0f, -150.0f), Vector3.Zero, Vector3.Up);
	    }

        public override void Initialize()
        {
            base.Initialize();
        }

        public override void LoadContents()
        {
            this.alpha.Model    = this.Render.LoadModelDefault("Model/Alpha");
            this.map.Model      = this.Render.LoadModelDefault("Model/Map");
            this.target.Model   = this.Render.LoadModelDefault("Model/Target");

            //これより下には何も書かない
            base.LoadContents();
        }
        
        protected override void UpdateActive()
        {
            if (InputState.IsDown(Keys.Left))
                Camera.Rotation += new Vector3(0.0f,0.01f,0.0f);
            base.UpdateActive();
        }

        public override void Draw()
        {
            Render.DrawMesh(alpha);

            base.Draw();
        }
 
    }
}
